openconnect: fix off-by-one while condition
authorChristian Lamparter <[email protected]>
Sat, 6 Dec 2025 19:53:14 +0000 (20:53 +0100)
committerHannu Nyman <[email protected]>
Tue, 9 Dec 2025 09:02:43 +0000 (10:02 +0100)
resolveip returns 0 on success. This means that the while loop
will just run until all tries are exhausted. But this was not
the intended behaviour.

Fixes: 20ea72607bbf ("openconnect: make host dependency more resilient")
Signed-off-by: Christian Lamparter <[email protected]>
net/openconnect/Makefile
net/openconnect/files/openconnect.sh

index c3101919f6a0c2800df2610a6d6137a80d82658f..6ce0c20c73559aa9da1b46f7a93d115a3b4ac088 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=openconnect
 PKG_VERSION:=9.12
-PKG_RELEASE:=5
+PKG_RELEASE:=6
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://www.infradead.org/openconnect/download
index 69052e767d5a99830fee8e5222e20abdca766acf..ae8408b19ef64e8aaca9af1d8960c2dd3724d853 100755 (executable)
@@ -86,7 +86,7 @@ proto_openconnect_setup() {
                [ -n $uri ] && server=$(echo $uri | awk -F[/:] '{print $4}')
 
                logger -t "openconnect" "adding host dependency for $server at $config"
-               while resolveip -t 10 "$server" > "$tmpfile" && [ "$trials" -gt 0 ]; do
+               while resolveip -t 10 "$server" > "$tmpfile" && [ "$trials" -gt 0 ]; do
                        sleep 5
                        trials=$((trials - 1))
                done